// <script type="text/javascript">
// require(["core"], function() {
// 	require(["./js/pages/all-goods"],function (argument) {
//     	window.removeLoader();       	
// 	});
// });
// </script>

<div id="goods-type">
	<div id="left">

		<!-- 商品分类 -->
		<div id="types">
			{{#> "goods-types","goods-types",true,({
				"a":[
					{"href":"","count":"11","type":"葡萄干"},
					{"href":"","count":"11","type":"饼干"},
					{"href":"","count":"11","type":"水果"},
					{"href":"","count":"11","type":"干货"},
					{"href":"","count":"11","type":"硬货"},
					{"href":"","count":"11","type":"水货"},
					{"href":"","count":"11","type":"想把来"},
					{"href":"","count":"11","type":"老干妈"},
					{"href":"","count":"11","type":"sdg"},
					{"href":"","count":"11","type":"第四范式"},
					{"href":"","count":"11","type":"反攻倒算"},
					{"href":"","count":"11","type":"个撒旦撒"},
					{"href":"","count":"11","type":"东风浩荡"}
				]
			})}}
		</div>


		<hr />

		<!-- 每页显示12个商品 -->
		<div id="goods">
		{{#each goods}}
			<main-goods-test
				href="/goods-details.html?id={{_id}}"
				src = "{{preview_img_url}}?imageView/1/w/132/h/132"
				name="{{goods_name}}"
				intro="{{intro}}"
				price="{{price}}"
				count="{{num}}"
			></main-goods-test>
		{{/each}}
		</div>

		<!-- 翻页 -->
		<div id="page_turn">
			<div id="pre_page">
				{{#if $Cache.current_page_num!=0}}
				<a title="前一页" href="/all-goods-beta.html#?id={{$Top.$Cahce.goods_list_type}}&page={{$Cache.current_page_num-1}}&num={{$Cache.goods_pre_num}}"><i name="pre_page" class="icon-arrow-left"></i></a>
				{{/if}}
			</div>

			<div id="page_num">
				{{#each $Cache.page_num}}
					{{#if $Index==$Top.$Cache.current_page_num}}
					[当前页：{{~~$Index+1}}]
					{{#else}}
					<a href="/all-goods-beta.html#?id={{$Top.$Cahce.goods_list_type}}&page={{$Index}}&num={{$Top.$Cache.goods_pre_num}}">
					<span>{{~~$Index+1}}</span>
					</a>
					{{/if}}
				{{/each}}
			</div>

			<div id="next_page">
				{{#if $Cache.page_num.length>$Cache.current_page_num}}
				<a title="后一页" href="/all-goods-beta.html#?id={{$Top.$Cahce.goods_list_type}}&page={{$Cache.current_page_num+1}}&num={{$Cache.goods_pre_num}}"><i name="next_page" class="icon-arrow-right"></i></a>
				{{/if}}
			</div>
		</div>
	

	</div>

</div>